package cn.seecoder.courselearning.vo.course.test;

import cn.seecoder.courselearning.po.course.test.CourseTestPO;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.Date;


@Data
public class CourseTestVO {
    // 测试id
    private int testId;

    // 测试开始时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startTime;

    // 测试结束时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endTime;

    // 测试所属课程id
    private int courseId;

    private String testName;

    private int testStatus;

    public CourseTestVO() {
    }

    public CourseTestVO(int testId, Date startTime, Date endTime, int courseId, String testName, int testStatus) {
        this.testId = testId;
        this.startTime = startTime;
        this.endTime = endTime;
        this.courseId = courseId;
        this.testName = testName;
        this.testStatus = testStatus;
    }

    public CourseTestVO(CourseTestPO courseTestPO) {
        this.testId = courseTestPO.getTestId();
        this.startTime = courseTestPO.getStartTime();
        this.endTime = courseTestPO.getEndTime();
        this.courseId = courseTestPO.getCourseId();
        this.testName = courseTestPO.getTestName();
        this.testStatus = courseTestPO.getTestStatus();
    }
}
